Sign HarmonyOS packages
A HarmonyOS device installs only a signed package, so the signing material is not optional. It is issued for a developer account and cannot be generated locally.
- Go to Preferences > SDKs > HarmonyOS > Package Signing.
- Set Certificate (.cer), Provisioning profile (.p7b), Keystore (.p12), and Key alias to what the account issued.
- Enter Key password and Keystore password. Qt Creator keeps them in the system keychain. They can also be passed in the environment as
QT_HARMONYOS_SIGNING_KEY_PASSWORDandQT_HARMONYOS_SIGNING_STORE_PASSWORD, which is what a build machine would do. Only the passwords fall back to the environment, so the other four have to be set here.
Qt Creator reads the provisioning profile before it packages, and reports what it can see there as issues:
- It packages under the bundle name the profile is for, and says so when that is not the name the project asked for.
- It drops the restricted permissions the profile does not list under
allowed-acls, which the device would otherwise refuse the whole package for, and names them, so they can be added to the profile. - It reports a profile whose validity expired or has not started yet.
- It reports a device whose UDID the profile does not list, which is what a debug profile installs by.
See also Developing for HarmonyOS devices, How to: Develop for HarmonyOS, and Set up the HarmonyOS SDK.